package _1._0._0._127.ormrpc.services.WSWSAccountBalance;

public class WSWSAccountBalanceSrvProxyProxy implements WSWSAccountBalanceSrvProxy {
    private String _endpoint = null;
    private WSWSAccountBalanceSrvProxy wSWSAccountBalanceSrvProxy = null;

    public WSWSAccountBalanceSrvProxyProxy() {
        _initWSWSAccountBalanceSrvProxyProxy();
    }

    public WSWSAccountBalanceSrvProxyProxy(String endpoint) {
        _endpoint = endpoint;
        _initWSWSAccountBalanceSrvProxyProxy();
    }

    private void _initWSWSAccountBalanceSrvProxyProxy() {
        try {
            wSWSAccountBalanceSrvProxy = (new WSWSAccountBalanceSrvProxyServiceLocator()).getWSWSAccountBalance();
            if (wSWSAccountBalanceSrvProxy != null) {
                if (_endpoint != null)
                    ((javax.xml.rpc.Stub) wSWSAccountBalanceSrvProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
                else
                    _endpoint = (String) ((javax.xml.rpc.Stub) wSWSAccountBalanceSrvProxy)._getProperty("javax.xml.rpc.service.endpoint.address");
            }

        } catch (javax.xml.rpc.ServiceException serviceException) {
        }
    }

    public String getEndpoint() {
        return _endpoint;
    }

    public void setEndpoint(String endpoint) {
        _endpoint = endpoint;
        if (wSWSAccountBalanceSrvProxy != null)
            ((javax.xml.rpc.Stub) wSWSAccountBalanceSrvProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);

    }

    public WSWSAccountBalanceSrvProxy getWSWSAccountBalanceSrvProxy() {
        if (wSWSAccountBalanceSrvProxy == null)
            _initWSWSAccountBalanceSrvProxyProxy();
        return wSWSAccountBalanceSrvProxy;
    }

    public String closePeriod(String companyNumber, int periodYear, int periodNumber, int status) throws java.rmi.RemoteException, wsaccountbalance.client.WSInvokeException {
        if (wSWSAccountBalanceSrvProxy == null)
            _initWSWSAccountBalanceSrvProxyProxy();
        return wSWSAccountBalanceSrvProxy.closePeriod(companyNumber, periodYear, periodNumber, status);
    }

    public String findObjectByNumber(String number) throws java.rmi.RemoteException, wsaccountbalance.client.WSInvokeException {
        if (wSWSAccountBalanceSrvProxy == null)
            _initWSWSAccountBalanceSrvProxyProxy();
        return wSWSAccountBalanceSrvProxy.findObjectByNumber(number);
    }

    public boolean deleteAccountBalance(String companyNumber, int periodYear, int periodNumber) throws java.rmi.RemoteException, wsaccountbalance.client.WSInvokeException {
        if (wSWSAccountBalanceSrvProxy == null)
            _initWSWSAccountBalanceSrvProxyProxy();
        return wSWSAccountBalanceSrvProxy.deleteAccountBalance(companyNumber, periodYear, periodNumber);
    }

    public String importAccountBalance(wsaccountbalance.client.WSWSAccountBalance[] accountBalanceCols) throws java.rmi.RemoteException, wsaccountbalance.client.WSInvokeException {
        if (wSWSAccountBalanceSrvProxy == null)
            _initWSWSAccountBalanceSrvProxyProxy();
        return wSWSAccountBalanceSrvProxy.importAccountBalance(accountBalanceCols);
    }


}